<template>
    <el-icon :size="20" @click="toggleFullScreen">
        <FullScreen />
    </el-icon>
</template>

<script>
import { defineComponent } from 'vue'
import screenfull from 'screenfull'

export default defineComponent({
    methods: {
        toggleFullScreen() {
            if (screenfull.isEnabled) {
                screenfull.toggle()
            }
        }
    }
})
</script>
